/**
 * @class Spark.ImageCode
 * @extends Spark.Component
 * <p>图片验证码组件.
 * @author njq.niu@hand-china.com
 * @constructor 
 */
$S.ImageCode = Ext.extend($S.ViewComponent,{
    processListener: function(ou){
        $S.ImageCode.superclass.processListener.call(this,ou);
        this.wrap[ou]("click", this.onClick,  this);
    },
    onClick : function(){
    	this.refresh();
    },
    /**
     * 重新加载验证码
     * 
     */
    refresh : function(){
        this.wrap.dom.src = "imagecode?r="+Math.random();
    }
});